package com.lc.pianostudent.activity;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.alibaba.fastjson.JSONException;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONType;
import com.lc.pianostudent.BaseApplication;
import com.lc.pianostudent.R;
import com.lc.pianostudent.conn.PostGetAnswer;
import com.lc.pianostudent.conn.PostUpdateName;
import com.lc.pianostudent.dialog.AskDialog;
import com.lc.pianostudent.dialog.AuestionDialog;
import com.lc.pianostudent.fragment.MineFragment;
import com.lc.pianostudent.view.CountDownView;
import com.zcx.helper.bound.BoundView;
import com.zcx.helper.glide.GlideLoader;
import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.util.UtilToast;



import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;

/**
 * Created by Administrator on 2018/7/9.
 */

public class QuestionActivity extends BaseActivity implements View.OnClickListener{

    CountDownView cdv;
    @BoundView(value = R.id.next_question,isClick = true) private TextView next_question;
    @BoundView(value = R.id.total_question) private TextView total_question;
    private int total_question_int = 1;
    @BoundView(value = R.id.rl_title_back,isClick = true) private RelativeLayout rl_title_back;
    @BoundView(R.id.type) private TextView type_text;
    @BoundView(R.id.title_text) private TextView title_text;
    @BoundView(R.id.title_image) private ImageView title_image;
    @BoundView(R.id.choose_a) private TextView choose_a;
    @BoundView(R.id.choose_b) private TextView choose_b;
    @BoundView(R.id.choose_c) private TextView choose_c;
    @BoundView(R.id.choose_d) private TextView choose_d;
    @BoundView(R.id.choose_e) private TextView choose_e;

    @BoundView(R.id.choose_a_back) private TextView choose_a_back;
    @BoundView(R.id.choose_b_back) private TextView choose_b_back;
    @BoundView(R.id.choose_c_back) private TextView choose_c_back;
    @BoundView(R.id.choose_d_back) private TextView choose_d_back;
    @BoundView(R.id.choose_e_back) private TextView choose_e_back;
    @BoundView(R.id.title_text_count) private TextView title_text_count;

    @BoundView(value = R.id.one_layout,isClick = true) private RelativeLayout one_layout;
    @BoundView(value = R.id.two_layout,isClick = true) private RelativeLayout two_layout;
    @BoundView(value = R.id.three_layout,isClick = true) private RelativeLayout three_layout;
    @BoundView(value = R.id.four_layout,isClick = true) private RelativeLayout four_layout;
    @BoundView(value = R.id.five_layout,isClick = true) private RelativeLayout five_layout;

    @BoundView(R.id.choose_a_image) private ImageView choose_a_image;
    @BoundView(R.id.choose_b_image) private ImageView choose_b_image;
    @BoundView(R.id.choose_c_image) private ImageView choose_c_image;
    @BoundView(R.id.choose_d_image) private ImageView choose_d_image;
    @BoundView(R.id.choose_e_image) private ImageView choose_e_image;

    private String type_choose;  //单选  多选或者判断
    private int one_duoxuan = 0;  //A选项多选状态
    private int two_duoxuan = 0;  //B选项多选状态
    private int three_duoxuan = 0;  //c选项多选状态
    private int four_duoxuan = 0;  //D选项多选状态
    private int five_duoxuan = 0;  //E选项多选状态

    private int one_daxuan = 0;  //A选项单选状态
    private int two_daxuan = 0;   //A选项单选状态
    private int three_daxuan = 0;   //A选项单选状态
    private int four_daxuan = 0;   //A选项单选状态
    private int five_daxuan = 0;   //A选项单选状态

    private int one_panduan = 0;  //A选项判断状态
    private int two_panduan = 0;   //A选项判断状态
    private int three_panduan = 0;   //A选项判断状态
    private int four_panduan = 0;   //A选项判断状态
    private int five_panduan = 0;   //A选项判断状态
    private PostGetAnswer.PostGetAnswerInfo currentInfo;

    ArrayList<String> collectIds = new ArrayList<>();  //多选答案的集合
    private JSONObject zong_question = new JSONObject(true);
    private JSONObject question1 = new JSONObject();
    private JSONObject question2 = new JSONObject();
    private JSONObject question3 = new JSONObject();
    private JSONObject question4 = new JSONObject();
    private JSONObject question5 = new JSONObject();
    private JSONObject question6 = new JSONObject();
    private JSONObject question7 = new JSONObject();
    private JSONObject question8 = new JSONObject();
    private JSONObject question9 = new JSONObject();
    private JSONObject question10 = new JSONObject();
    private String one_id = "",two_id= "",three_id= "",four_id= "",
            five_id= "",six_id= "",seven_id= "",eight_id= "",nine_id= "",ten_id= "";

    private ArrayList<ArrayList<String>> answerList = new ArrayList<>();
    private ArrayList<String> answerItemList1 = new ArrayList<>();
    private ArrayList<String> answerItemList2 = new ArrayList<>();
    private ArrayList<String> answerItemList3 = new ArrayList<>();
    private ArrayList<String> answerItemList4 = new ArrayList<>();
    private ArrayList<String> answerItemList5 = new ArrayList<>();
    private ArrayList<String> answerItemList6 = new ArrayList<>();
    private ArrayList<String> answerItemList7 = new ArrayList<>();
    private ArrayList<String> answerItemList8 = new ArrayList<>();
    private ArrayList<String> answerItemList9 = new ArrayList<>();
    private ArrayList<String> answerItemList10 = new ArrayList<>();
    //题目接口
    public PostGetAnswer postGetAnswer = new PostGetAnswer(new AsyCallBack<PostGetAnswer.PostGetAnswerInfo>(){

        @Override
        public void onSuccess(String toast, int type, Object o, final PostGetAnswer.PostGetAnswerInfo postGetAnswerInfo) throws Exception {
//            Log.e("-----121",total_question_int+"===oa");
            currentInfo = postGetAnswerInfo;
            total_question.setText(total_question_int+"");
            type_choose = postGetAnswerInfo.questionList.get(0).getType();
            if(postGetAnswerInfo.questionList.get(0).getType().equals("4")){ //单选
                one_layout.setVisibility(View.VISIBLE);
                two_layout.setVisibility(View.VISIBLE);
                three_layout.setVisibility(View.VISIBLE);
                four_layout.setVisibility(View.VISIBLE);
                five_layout.setVisibility(View.INVISIBLE);
                type_text.setText("单选");
            }else if(postGetAnswerInfo.questionList.get(0).getType().equals("5")){  //多选
                one_layout.setVisibility(View.VISIBLE);
                two_layout.setVisibility(View.VISIBLE);
                three_layout.setVisibility(View.VISIBLE);
                four_layout.setVisibility(View.VISIBLE);
                five_layout.setVisibility(View.VISIBLE);
                type_text.setText("多选");
            }else if(postGetAnswerInfo.questionList.get(0).getType().equals("2")){  //判断

                one_layout.setVisibility(View.VISIBLE);
                two_layout.setVisibility(View.VISIBLE);
                three_layout.setVisibility(View.INVISIBLE);
                four_layout.setVisibility(View.INVISIBLE);
                five_layout.setVisibility(View.INVISIBLE);
                type_text.setText("判断");
            }
            title_text_count.setText(total_question_int+"、");
            if(!TextUtils.isEmpty(postGetAnswerInfo.questionList.get(0).getPicurl())){
                title_image.setVisibility(View.VISIBLE);
                GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(0).getPicurl(),title_image);
            }else {
                title_image.setVisibility(View.GONE);
            }

            title_text.setText(postGetAnswerInfo.questionList.get(0).getTitle());
            if(postGetAnswerInfo.questionList.get(0).getFormat().equals("1")){
                choose_a.setVisibility(View.VISIBLE);
                choose_b.setVisibility(View.VISIBLE);
                choose_c.setVisibility(View.VISIBLE);
                choose_d.setVisibility(View.VISIBLE);
                choose_e.setVisibility(View.VISIBLE);

                choose_a_image.setVisibility(View.INVISIBLE);
                choose_b_image.setVisibility(View.INVISIBLE);
                choose_c_image.setVisibility(View.INVISIBLE);
                choose_d_image.setVisibility(View.INVISIBLE);
                choose_e_image.setVisibility(View.INVISIBLE);

                choose_a.setText(postGetAnswerInfo.questionList.get(0).getOptionA());
                choose_b.setText(postGetAnswerInfo.questionList.get(0).getOptionB());
                choose_c.setText(postGetAnswerInfo.questionList.get(0).getOptionC());
                choose_d.setText(postGetAnswerInfo.questionList.get(0).getOptionD());
                choose_e.setText(postGetAnswerInfo.questionList.get(0).getOptionE());
            }else {
                choose_a.setVisibility(View.INVISIBLE);
                choose_b.setVisibility(View.INVISIBLE);
                choose_c.setVisibility(View.INVISIBLE);
                choose_d.setVisibility(View.INVISIBLE);
                choose_e.setVisibility(View.INVISIBLE);

                choose_a_image.setVisibility(View.VISIBLE);
                choose_b_image.setVisibility(View.VISIBLE);
                choose_c_image.setVisibility(View.VISIBLE);
                choose_d_image.setVisibility(View.VISIBLE);
                choose_e_image.setVisibility(View.VISIBLE);
                GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(0).getOptionApic(),choose_a_image);
                GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(0).getOptionBpic(),choose_b_image);
                GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(0).getOptionCpic(),choose_c_image);
                GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(0).getOptionDpic(),choose_d_image);
                GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(0).getOptionEpic(),choose_e_image);

            }

            cdv.restart();
            cdv.setOnCountDownListener(new CountDownView.OnCountDownListener() {
                @Override
                public void start() {
//                Toast.makeText(QuestionActivity.this, "倒计时开始", Toast.LENGTH_SHORT).show();
                }

                @Override
                public void finish() {



                    if(total_question_int<= 9){
                        if(total_question_int== 9){
                            next_question.setText("完成答题");
                        }
                        cdv.startCountdown();



                        //填充json
                        sendCanshu();
                        total_question_int++;
                        total_question.setText(total_question_int+"");
                        //UI页面刷新，每次新题，选项为未选择状态
                        one_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                        two_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                        three_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                        four_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                        five_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                        choose_a.setTextColor(Color.parseColor("#424242"));
                        choose_a_back.setTextColor(Color.parseColor("#424242"));

                        choose_b.setTextColor(Color.parseColor("#424242"));
                        choose_b_back.setTextColor(Color.parseColor("#424242"));

                        choose_c.setTextColor(Color.parseColor("#424242"));
                        choose_c_back.setTextColor(Color.parseColor("#424242"));

                        choose_d.setTextColor(Color.parseColor("#424242"));
                        choose_d_back.setTextColor(Color.parseColor("#424242"));

                        choose_e.setTextColor(Color.parseColor("#424242"));
                        choose_e_back.setTextColor(Color.parseColor("#424242"));

                        if(postGetAnswerInfo.questionList.get(total_question_int-1).getType().equals("4")){
                            one_layout.setVisibility(View.VISIBLE);
                            two_layout.setVisibility(View.VISIBLE);
                            three_layout.setVisibility(View.VISIBLE);
                            four_layout.setVisibility(View.VISIBLE);
                            five_layout.setVisibility(View.INVISIBLE);
                            type_text.setText("单选");
                        }else if(postGetAnswerInfo.questionList.get(total_question_int-1).getType().equals("5")){
                            one_layout.setVisibility(View.VISIBLE);
                            two_layout.setVisibility(View.VISIBLE);
                            three_layout.setVisibility(View.VISIBLE);
                            four_layout.setVisibility(View.VISIBLE);
                            five_layout.setVisibility(View.VISIBLE);
                            type_text.setText("多选");
                        }else if(postGetAnswerInfo.questionList.get(total_question_int-1).getType().equals("2")){

                            one_layout.setVisibility(View.VISIBLE);
                            two_layout.setVisibility(View.VISIBLE);
                            three_layout.setVisibility(View.INVISIBLE);
                            four_layout.setVisibility(View.INVISIBLE);
                            five_layout.setVisibility(View.INVISIBLE);
                            type_text.setText("判断");
                        }
                        title_text_count.setText(total_question_int+"、");
                        if(!TextUtils.isEmpty(postGetAnswerInfo.questionList.get(total_question_int-1).getPicurl())){
                            title_image.setVisibility(View.VISIBLE);
                            GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(total_question_int-1).getPicurl(),title_image);
                        }else {
                            title_image.setVisibility(View.GONE);
                        }
//                        GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(total_question_int-1).getPicurl(),title_image);
                        title_text.setText(postGetAnswerInfo.questionList.get(total_question_int-1).getTitle());
                        if(postGetAnswerInfo.questionList.get(total_question_int-1).getFormat().equals("1")){
                            choose_a.setVisibility(View.VISIBLE);
                            choose_b.setVisibility(View.VISIBLE);
                            choose_c.setVisibility(View.VISIBLE);
                            choose_d.setVisibility(View.VISIBLE);
                            choose_e.setVisibility(View.VISIBLE);

                            choose_a_image.setVisibility(View.INVISIBLE);
                            choose_b_image.setVisibility(View.INVISIBLE);
                            choose_c_image.setVisibility(View.INVISIBLE);
                            choose_d_image.setVisibility(View.INVISIBLE);
                            choose_e_image.setVisibility(View.INVISIBLE);
                            choose_a.setText(postGetAnswerInfo.questionList.get(total_question_int-1).getOptionA());
                            choose_b.setText(postGetAnswerInfo.questionList.get(total_question_int-1).getOptionB());
                            choose_c.setText(postGetAnswerInfo.questionList.get(total_question_int-1).getOptionC());
                            choose_d.setText(postGetAnswerInfo.questionList.get(total_question_int-1).getOptionD());
                            choose_e.setText(postGetAnswerInfo.questionList.get(total_question_int-1).getOptionE());
                        }else {

                            choose_a.setVisibility(View.INVISIBLE);
                            choose_b.setVisibility(View.INVISIBLE);
                            choose_c.setVisibility(View.INVISIBLE);
                            choose_d.setVisibility(View.INVISIBLE);
                            choose_e.setVisibility(View.INVISIBLE);

                            choose_a_image.setVisibility(View.VISIBLE);
                            choose_b_image.setVisibility(View.VISIBLE);
                            choose_c_image.setVisibility(View.VISIBLE);
                            choose_d_image.setVisibility(View.VISIBLE);
                            choose_e_image.setVisibility(View.VISIBLE);
                            GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(total_question_int-1).getOptionApic(),choose_a_image);
                            GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(total_question_int-1).getOptionBpic(),choose_b_image);
                            GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(total_question_int-1).getOptionCpic(),choose_c_image);
                            GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(total_question_int-1).getOptionDpic(),choose_d_image);
                            GlideLoader.getInstance().get("",postGetAnswerInfo.questionList.get(total_question_int-1).getOptionEpic(),choose_e_image);

                        }

                        one_duoxuan = 0;
                        two_duoxuan = 0;
                        three_duoxuan = 0;
                        four_duoxuan = 0;
                        five_duoxuan = 0;

                        one_daxuan = 0;   //单选状态，用于填充json
                        two_daxuan = 0;
                        three_daxuan = 0;
                        four_daxuan = 0;
                        five_daxuan = 0;

                        one_panduan = 0;   //判断状态，用于填充json
                        two_panduan = 0;
                        three_panduan = 0;
                        four_panduan = 0;
                        five_panduan = 0;
                        collectIds.clear();

                    }else {

//                        try {
//                            //如果是单选，看看哪个被选中
//                            if (postGetAnswerInfo.questionList.get(9).getType().equals("4")){
//                                if(one_daxuan == 1){
//                                    question10.put("content","A");
//                                }else if(two_daxuan == 1){
//                                    question10.put("content","B");
//                                }else if(three_daxuan == 1){
//                                    question10.put("content","C");
//                                }else if(four_daxuan == 1){
//                                    question10.put("content","D");
//                                }else if(five_daxuan == 1){
//                                    question10.put("content","E");
//                                }else {
//                                    question10.put("content","");
//                                }
//                                question10.put("type","4");
//                            }else if(postGetAnswerInfo.questionList.get(9).getType().equals("5")){
//
//                                String str = collectIds.toString();
//                                int len = str.length() - 1;
//                                String ids = str.substring(1, len).replace(" ", "");//"keyids":”1,2,3”
//                                question10.put("content",ids);
//                                question10.put("type","5");
//                            }else if(postGetAnswerInfo.questionList.get(9).getType().equals("2")){
//                                if(one_panduan == 1){
//                                    question10.put("content","A");
//                                }else if(two_panduan == 1){
//                                    question10.put("content","B");
//                                }else if(three_panduan == 1){
//                                    question10.put("content","C");
//                                }else if(four_panduan == 1){
//                                    question10.put("content","D");
//                                }else if(five_panduan == 1){
//                                    question10.put("content","E");
//                                }else {
//                                    question10.put("content","");
//                                }
//                                question10.put("type","2");
//                            }
//
//                        } catch (JSONException e) {
//                            e.printStackTrace();
//
//                        }
//
//                        Log.e("----ques",question1.toString()+"----");


//                            zong_question.put(postGetAnswerInfo.questionList.get(9).getId(),question10);
//                            zong_question.put(postGetAnswerInfo.questionList.get(8).getId(),question9);
//                            zong_question.put(postGetAnswerInfo.questionList.get(7).getId(),question8);
//                            zong_question.put(postGetAnswerInfo.questionList.get(6).getId(),question7);
//                            zong_question.put(postGetAnswerInfo.questionList.get(5).getId(),question6);
//                            zong_question.put(postGetAnswerInfo.questionList.get(4).getId(),question5);
//                            zong_question.put(postGetAnswerInfo.questionList.get(3).getId(),question4);
//                            zong_question.put(postGetAnswerInfo.questionList.get(2).getId(),question3);
//                            zong_question.put(postGetAnswerInfo.questionList.get(1).getId(),question2);
//                            zong_question.put(postGetAnswerInfo.questionList.get(0).getId(),question1);
//                             one_id = postGetAnswerInfo.questionList.get(0).getId();
//                             two_id = postGetAnswerInfo.questionList.get(1).getId();
//                             three_id = postGetAnswerInfo.questionList.get(2).getId();
//                             four_id = postGetAnswerInfo.questionList.get(3).getId();
//                             five_id = postGetAnswerInfo.questionList.get(4).getId();
//                             six_id = postGetAnswerInfo.questionList.get(5).getId();
//                             seven_id = postGetAnswerInfo.questionList.get(6).getId();
//                             eight_id = postGetAnswerInfo.questionList.get(7).getId();
//                             nine_id = postGetAnswerInfo.questionList.get(8).getId();
//                             ten_id = postGetAnswerInfo.questionList.get(9).getId();

                        sendCanshu();
                        setJson();


//                        Log.e("----zon",zong_question.toString()+"----");
//                        Log.e("----jy","----else");
////

                    }

                }
            });
        }

        @Override
        public void onFail(String toast, int type) throws Exception {
            UtilToast.show(toast);
        }
    });
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_question);


        cdv = findViewById(R.id.countDownView);
        postGetAnswer.type = getIntent().getStringExtra("type");
        postGetAnswer.user_id = BaseApplication.BasePreferences.readUID();
        postGetAnswer.execute();

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.next_question:
                Log.e("----jy","0000");
                sendCanshu();
                cdv.restart1();

                break;

            case R.id.rl_title_back:
                new AuestionDialog(this, R.layout.dialog_study_exit,10-total_question_int) {
                    @Override
                    public void cancel() {
                        dismiss();
                    }

                    @Override
                    public void confirm() {
                        sendCanshu();
                        setJson();
                        cdv.stopCountdown();
                    }
                }.show();
                break;

            case R.id.one_layout:   //A选项
                if(currentInfo.questionList.get(total_question_int-1).getType().equals("4")){
                    //单选，只选择一个
                    one_daxuan = 1;   //单选状态，用于填充json
                    two_daxuan = 0;
                    three_daxuan = 0;
                    four_daxuan = 0;
                    five_daxuan = 0;
                    one_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                    two_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    three_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    four_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    five_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    choose_a.setTextColor(Color.parseColor("#ffffff"));
                    choose_a_back.setTextColor(Color.parseColor("#ffffff"));

                    choose_b.setTextColor(Color.parseColor("#424242"));
                    choose_b_back.setTextColor(Color.parseColor("#424242"));

                    choose_c.setTextColor(Color.parseColor("#424242"));
                    choose_c_back.setTextColor(Color.parseColor("#424242"));

                    choose_d.setTextColor(Color.parseColor("#424242"));
                    choose_d_back.setTextColor(Color.parseColor("#424242"));

                    choose_e.setTextColor(Color.parseColor("#424242"));
                    choose_e_back.setTextColor(Color.parseColor("#424242"));
                }else if(currentInfo.questionList.get(total_question_int-1).getType().equals("5")){
                    if(one_duoxuan == 0){
                        collectIds.add("A");
                        one_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                        choose_a.setTextColor(Color.parseColor("#ffffff"));
                        choose_a_back.setTextColor(Color.parseColor("#ffffff"));
                        one_duoxuan = 1;
                    }else {
                        collectIds.remove("A");
                        one_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                        choose_a.setTextColor(Color.parseColor("#424242"));
                        choose_a_back.setTextColor(Color.parseColor("#424242"));
                        one_duoxuan = 0;
                    }
                }else if(currentInfo.questionList.get(total_question_int-1).getType().equals("2")){
                    //判断，只选择一个
                    one_panduan = 1;   //单选状态，用于填充json
                    two_panduan = 0;
                    three_panduan = 0;
                    four_panduan = 0;
                    five_panduan = 0;
                    one_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                    two_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    three_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    four_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    five_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);

                    choose_a.setTextColor(Color.parseColor("#ffffff"));
                    choose_a_back.setTextColor(Color.parseColor("#ffffff"));

                    choose_b.setTextColor(Color.parseColor("#424242"));
                    choose_b_back.setTextColor(Color.parseColor("#424242"));

                    choose_c.setTextColor(Color.parseColor("#424242"));
                    choose_c_back.setTextColor(Color.parseColor("#424242"));

                    choose_d.setTextColor(Color.parseColor("#424242"));
                    choose_d_back.setTextColor(Color.parseColor("#424242"));

                    choose_e.setTextColor(Color.parseColor("#424242"));
                    choose_e_back.setTextColor(Color.parseColor("#424242"));
                }
                sendCanshu();
                break;
            case R.id.two_layout:   //B选项
                if(currentInfo.questionList.get(total_question_int-1).getType().equals("4")){
                    //单选，只选择一个
                    one_daxuan = 0;   //单选状态，用于填充json
                    two_daxuan = 1;
                    three_daxuan = 0;
                    four_daxuan = 0;
                    five_daxuan = 0;
                    one_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    two_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                    three_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    four_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    five_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);

                    choose_a.setTextColor(Color.parseColor("#424242"));
                    choose_a_back.setTextColor(Color.parseColor("#424242"));

                    choose_b.setTextColor(Color.parseColor("#ffffff"));
                    choose_b_back.setTextColor(Color.parseColor("#ffffff"));

                    choose_c.setTextColor(Color.parseColor("#424242"));
                    choose_c_back.setTextColor(Color.parseColor("#424242"));

                    choose_d.setTextColor(Color.parseColor("#424242"));
                    choose_d_back.setTextColor(Color.parseColor("#424242"));

                    choose_e.setTextColor(Color.parseColor("#424242"));
                    choose_e_back.setTextColor(Color.parseColor("#424242"));
                }else if(currentInfo.questionList.get(total_question_int-1).getType().equals("5")){
                    if(two_duoxuan == 0){
                        collectIds.add("B");
                        two_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                        choose_b.setTextColor(Color.parseColor("#ffffff"));
                        choose_b_back.setTextColor(Color.parseColor("#ffffff"));
                        two_duoxuan = 1;
                    }else {
                        collectIds.remove("B");
                        two_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                        choose_b.setTextColor(Color.parseColor("#424242"));
                        choose_b_back.setTextColor(Color.parseColor("#424242"));

                        two_duoxuan = 0;
                    }
                }else if(currentInfo.questionList.get(total_question_int-1).getType().equals("2")){
                    //判断，只选择一个
                    one_panduan = 0;   //单选状态，用于填充json
                    two_panduan = 1;
                    three_panduan = 0;
                    four_panduan = 0;
                    five_panduan = 0;
                    one_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    two_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                    three_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    four_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    five_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);

                    choose_a.setTextColor(Color.parseColor("#424242"));
                    choose_a_back.setTextColor(Color.parseColor("#424242"));

                    choose_b.setTextColor(Color.parseColor("#ffffff"));
                    choose_b_back.setTextColor(Color.parseColor("#ffffff"));

                    choose_c.setTextColor(Color.parseColor("#424242"));
                    choose_c_back.setTextColor(Color.parseColor("#424242"));

                    choose_d.setTextColor(Color.parseColor("#424242"));
                    choose_d_back.setTextColor(Color.parseColor("#424242"));

                    choose_e.setTextColor(Color.parseColor("#424242"));
                    choose_e_back.setTextColor(Color.parseColor("#424242"));
                }
                sendCanshu();
                break;
            case R.id.three_layout:   //C选项
                if(currentInfo.questionList.get(total_question_int-1).getType().equals("4")){
                    //单选，只选择一个
                    one_daxuan = 0;   //单选状态，用于填充json
                    two_daxuan = 0;
                    three_daxuan = 1;
                    four_daxuan = 0;
                    five_daxuan = 0;
                    one_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    two_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    three_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                    four_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    five_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);

                    choose_a.setTextColor(Color.parseColor("#424242"));
                    choose_a_back.setTextColor(Color.parseColor("#424242"));

                    choose_b.setTextColor(Color.parseColor("#424242"));
                    choose_b_back.setTextColor(Color.parseColor("#424242"));

                    choose_c.setTextColor(Color.parseColor("#ffffff"));
                    choose_c_back.setTextColor(Color.parseColor("#ffffff"));

                    choose_d.setTextColor(Color.parseColor("#424242"));
                    choose_d_back.setTextColor(Color.parseColor("#424242"));

                    choose_e.setTextColor(Color.parseColor("#424242"));
                    choose_e_back.setTextColor(Color.parseColor("#424242"));
                }else if(currentInfo.questionList.get(total_question_int-1).getType().equals("5")){
                    if(three_duoxuan == 0){
                        collectIds.add("C");
                        three_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                        choose_c.setTextColor(Color.parseColor("#ffffff"));
                        choose_c_back.setTextColor(Color.parseColor("#ffffff"));
                        three_duoxuan = 1;
                    }else {
                        collectIds.remove("C");
                        three_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                        choose_c.setTextColor(Color.parseColor("#424242"));
                        choose_c_back.setTextColor(Color.parseColor("#424242"));
                        three_duoxuan = 0;
                    }
                }else if(currentInfo.questionList.get(total_question_int-1).getType().equals("2")){
                    //判断，只选择一个
                    one_panduan = 0;   //单选状态，用于填充json
                    two_panduan = 0;
                    three_panduan = 1;
                    four_panduan = 0;
                    five_panduan = 0;
                    one_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    two_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    three_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                    four_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    five_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);

                    choose_a.setTextColor(Color.parseColor("#424242"));
                    choose_a_back.setTextColor(Color.parseColor("#424242"));

                    choose_b.setTextColor(Color.parseColor("#424242"));
                    choose_b_back.setTextColor(Color.parseColor("#424242"));

                    choose_c.setTextColor(Color.parseColor("#ffffff"));
                    choose_c_back.setTextColor(Color.parseColor("#ffffff"));

                    choose_d.setTextColor(Color.parseColor("#424242"));
                    choose_d_back.setTextColor(Color.parseColor("#424242"));

                    choose_e.setTextColor(Color.parseColor("#424242"));
                    choose_e_back.setTextColor(Color.parseColor("#424242"));
                }
                sendCanshu();
                break;


            case R.id.four_layout:   //D选项
                if(currentInfo.questionList.get(total_question_int-1).getType().equals("4")){
                    //单选，只选择一个
                    one_daxuan = 0;   //单选状态，用于填充json
                    two_daxuan = 0;
                    three_daxuan = 0;
                    four_daxuan = 1;
                    five_daxuan = 0;
                    one_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    two_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    three_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    four_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                    five_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);

                    choose_a.setTextColor(Color.parseColor("#424242"));
                    choose_a_back.setTextColor(Color.parseColor("#424242"));

                    choose_b.setTextColor(Color.parseColor("#424242"));
                    choose_b_back.setTextColor(Color.parseColor("#424242"));

                    choose_c.setTextColor(Color.parseColor("#424242"));
                    choose_c_back.setTextColor(Color.parseColor("#424242"));

                    choose_d.setTextColor(Color.parseColor("#ffffff"));
                    choose_d_back.setTextColor(Color.parseColor("#ffffff"));

                    choose_e.setTextColor(Color.parseColor("#424242"));
                    choose_e_back.setTextColor(Color.parseColor("#424242"));
                }else if(currentInfo.questionList.get(total_question_int-1).getType().equals("5")){
                    if(four_duoxuan == 0){
                        collectIds.add("D");
                        four_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                        choose_d.setTextColor(Color.parseColor("#ffffff"));
                        choose_d_back.setTextColor(Color.parseColor("#ffffff"));
                        four_duoxuan = 1;
                    }else {
                        collectIds.remove("D");
                        four_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                        choose_d.setTextColor(Color.parseColor("#424242"));
                        choose_d_back.setTextColor(Color.parseColor("#424242"));
                        four_duoxuan = 0;
                    }
                }else if(currentInfo.questionList.get(total_question_int-1).getType().equals("2")){
                    //判断，只选择一个
                    one_panduan = 0;   //单选状态，用于填充json
                    two_panduan = 0;
                    three_panduan = 0;
                    four_panduan = 1;
                    five_panduan = 0;
                    one_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    two_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    three_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    four_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                    five_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);

                    choose_a.setTextColor(Color.parseColor("#424242"));
                    choose_a_back.setTextColor(Color.parseColor("#424242"));

                    choose_b.setTextColor(Color.parseColor("#424242"));
                    choose_b_back.setTextColor(Color.parseColor("#424242"));

                    choose_c.setTextColor(Color.parseColor("#424242"));
                    choose_c_back.setTextColor(Color.parseColor("#424242"));

                    choose_d.setTextColor(Color.parseColor("#ffffff"));
                    choose_d_back.setTextColor(Color.parseColor("#ffffff"));

                    choose_e.setTextColor(Color.parseColor("#424242"));
                    choose_e_back.setTextColor(Color.parseColor("#424242"));
                }
                sendCanshu();
                break;


            case R.id.five_layout:   //E选项
                if(currentInfo.questionList.get(total_question_int-1).getType().equals("4")){
                    //单选，只选择一个
                    one_daxuan = 0;   //单选状态，用于填充json
                    two_daxuan = 0;
                    three_daxuan = 0;
                    four_daxuan = 0;
                    five_daxuan = 1;
                    one_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    two_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    three_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    four_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    five_layout.setBackgroundResource(R.drawable.shape_blue_50px);

                    choose_a.setTextColor(Color.parseColor("#424242"));
                    choose_a_back.setTextColor(Color.parseColor("#424242"));

                    choose_b.setTextColor(Color.parseColor("#424242"));
                    choose_b_back.setTextColor(Color.parseColor("#424242"));

                    choose_c.setTextColor(Color.parseColor("#424242"));
                    choose_c_back.setTextColor(Color.parseColor("#424242"));

                    choose_d.setTextColor(Color.parseColor("#424242"));
                    choose_d_back.setTextColor(Color.parseColor("#424242"));

                    choose_e.setTextColor(Color.parseColor("#ffffff"));
                    choose_e_back.setTextColor(Color.parseColor("#ffffff"));
                }else if(currentInfo.questionList.get(total_question_int-1).getType().equals("5")){
                    if(five_duoxuan == 0){
                        collectIds.add("E");
                        five_layout.setBackgroundResource(R.drawable.shape_blue_50px);
                        choose_e.setTextColor(Color.parseColor("#ffffff"));
                        choose_e_back.setTextColor(Color.parseColor("#ffffff"));
                        five_duoxuan = 1;
                    }else {
                        collectIds.remove("D");
                        five_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                        choose_e.setTextColor(Color.parseColor("#424242"));
                        choose_e_back.setTextColor(Color.parseColor("#424242"));
                        five_duoxuan = 0;
                    }
                }else if(currentInfo.questionList.get(total_question_int-1).getType().equals("2")){
                    //判断，只选择一个
                    one_panduan = 0;   //单选状态，用于填充json
                    two_panduan = 0;
                    three_panduan = 0;
                    four_panduan = 0;
                    five_panduan = 1;
                    one_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    two_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    three_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    four_layout.setBackgroundResource(R.drawable.shape_circle40_gray_storke);
                    five_layout.setBackgroundResource(R.drawable.shape_blue_50px);

                    choose_a.setTextColor(Color.parseColor("#424242"));
                    choose_a_back.setTextColor(Color.parseColor("#424242"));

                    choose_b.setTextColor(Color.parseColor("#424242"));
                    choose_b_back.setTextColor(Color.parseColor("#424242"));

                    choose_c.setTextColor(Color.parseColor("#424242"));
                    choose_c_back.setTextColor(Color.parseColor("#424242"));

                    choose_d.setTextColor(Color.parseColor("#424242"));
                    choose_d_back.setTextColor(Color.parseColor("#424242"));

                    choose_e.setTextColor(Color.parseColor("#ffffff"));
                    choose_e_back.setTextColor(Color.parseColor("#ffffff"));
                }
                sendCanshu();
                break;
        }
    }


    //返回键
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if ((keyCode == KeyEvent.KEYCODE_BACK)) {
            new AuestionDialog(this, R.layout.dialog_study_exit,10-total_question_int) {
                @Override
                public void cancel() {
                    dismiss();
                }

                @Override
                public void confirm() {
                    sendCanshu();
                    setJson();
                    cdv.stopCountdown();
                }
            }.show();
            return false;
        } else {
            return super.onKeyDown(keyCode, event);
        }
    }

    private void setJson(){
        one_id = currentInfo.questionList.get(0).getId();
        two_id = currentInfo.questionList.get(1).getId();
        three_id = currentInfo.questionList.get(2).getId();
        four_id = currentInfo.questionList.get(3).getId();
        five_id = currentInfo.questionList.get(4).getId();
        six_id = currentInfo.questionList.get(5).getId();
        seven_id = currentInfo.questionList.get(6).getId();
        eight_id = currentInfo.questionList.get(7).getId();
        nine_id = currentInfo.questionList.get(8).getId();
        ten_id = currentInfo.questionList.get(9).getId();
        StringBuffer buffer = new StringBuffer();
        buffer.append("{\""+one_id+"\""+":" + question1 + ","
                +"\""+two_id+"\""+":" + question2+ ","
                +"\""+three_id+"\""+":" + question3+ ","
                +"\""+four_id+"\""+":" + question4+ ","
                +"\""+five_id+"\""+":" + question5+ ","
                +"\""+six_id+"\""+":" + question6+ ","
                +"\""+seven_id+"\""+":" + question7+ ","
                +"\""+eight_id+"\""+":" + question8+ ","
                +"\""+nine_id+"\""+":" + question9+ ","
                +"\""+ten_id+"\""+":" + question10+"}");

//        Log.e("----buff",buffer.toString()+"----");
        answerList.add(answerItemList1);
        answerList.add(answerItemList2);
        answerList.add(answerItemList3);
        answerList.add(answerItemList4);
        answerList.add(answerItemList5);
        answerList.add(answerItemList6);
        answerList.add(answerItemList7);
        answerList.add(answerItemList8);
        answerList.add(answerItemList9);
        answerList.add(answerItemList10);
        BaseApplication.INSTANCE.finishActivity(QuestionActivity.class);
//                        startVerifyActivity(AnswerResultActivity.class);
        startActivity(new Intent(QuestionActivity.this,AnswerResultActivity.class)
                .putExtra("json",buffer.toString())
                .putExtra("type",getIntent().getStringExtra("type"))
        .putExtra("list",answerList).putExtra("from","1"));   //1.从答题页进入  2.从每日答题进入
    }

    private void sendCanshu() {
//        Log.e("----total", total_question_int + "===page");
        if (total_question_int == 1) {
            answerItemList1.clear();
            try {
                //如果是单选，看看哪个被选中
                if (currentInfo.questionList.get(0).getType().equals("4")) {
                    if (one_daxuan == 1) {
                        question1.put("content", "A");
                        answerItemList1.add("A");
                    } else if (two_daxuan == 1) {
                        question1.put("content", "B");
                        answerItemList1.add("B");
                    } else if (three_daxuan == 1) {
                        question1.put("content", "C");
                        answerItemList1.add("C");
                    } else if (four_daxuan == 1) {
                        question1.put("content", "D");
                        answerItemList1.add("D");
                    } else if (five_daxuan == 1) {
                        question1.put("content", "E");
                        answerItemList1.add("E");
                    } else {
                        question1.put("content", "");
                        answerItemList1.add("");
                    }
                    question1.put("type", "4");
                    question2.put("content", "");
                    question2.put("type", "4");
                    question3.put("content", "");
                    question3.put("type", "4");
                    question4.put("content", "");
                    question4.put("type", "4");
                    question5.put("content", "");
                    question5.put("type", "4");
                    question6.put("content", "");
                    question6.put("type", "4");
                    question7.put("content", "");
                    question7.put("type", "4");
                    question8.put("content", "");
                    question8.put("type", "4");
                    question9.put("content", "");
                    question9.put("type", "4");
                    question10.put("content", "");
                    question10.put("type", "4");

                    answerItemList2.add("");
                    answerItemList3.add("");
                    answerItemList4.add("");
                    answerItemList5.add("");
                    answerItemList6.add("");
                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                } else if (currentInfo.questionList.get(0).getType().equals("5")) {

//                    Log.e("====size", collectIds.size() + "---jy");
                    String str = collectIds.toString();
                    int len = str.length() - 1;
                    String ids = str.substring(1, len).replace(" ", "");//"keyids":”1,2,3”
                    question1.put("content", ids);
                    question1.put("type", "5");

                    question2.put("content", "");
                    question2.put("type", "5");
                    question3.put("content", "");
                    question3.put("type", "5");
                    question4.put("content", "");
                    question4.put("type", "5");
                    question5.put("content", "");
                    question5.put("type", "5");
                    question6.put("content", "");
                    question6.put("type", "5");
                    question7.put("content", "");
                    question7.put("type", "5");
                    question8.put("content", "");
                    question8.put("type", "5");
                    question9.put("content", "");
                    question9.put("type", "5");
                    question10.put("content", "");
                    question10.put("type", "5");

                    if(collectIds.size() != 0){
                        answerItemList1.addAll(collectIds);
                    }else {
                        answerItemList1.add("");
                    }
                } else if (currentInfo.questionList.get(0).getType().equals("2")) {
                    if (one_panduan == 1) {
                        question1.put("content", "A");
                        answerItemList1.add("A");
                    } else if (two_panduan == 1) {
                        question1.put("content", "B");
                        answerItemList1.add("B");
                    } else if (three_panduan == 1) {
                        question1.put("content", "C");
                        answerItemList1.add("C");
                    } else if (four_panduan == 1) {
                        question1.put("content", "D");
                        answerItemList1.add("D");
                    } else if (five_panduan == 1) {
                        question1.put("content", "E");
                        answerItemList1.add("E");
                    } else {
                        question1.put("content", "");
                        answerItemList1.add("");
                    }
                    question1.put("type", "2");

                    question2.put("content", "");
                    question2.put("type", "2");
                    question3.put("content", "");
                    question3.put("type", "2");
                    question4.put("content", "");
                    question4.put("type", "2");
                    question5.put("content", "");
                    question5.put("type", "2");
                    question6.put("content", "");
                    question6.put("type", "2");
                    question7.put("content", "");
                    question7.put("type", "2");
                    question8.put("content", "");
                    question8.put("type", "2");
                    question9.put("content", "");
                    question9.put("type", "2");
                    question10.put("content", "");
                    question10.put("type", "2");

                    answerItemList2.add("");
                    answerItemList3.add("");
                    answerItemList4.add("");
                    answerItemList5.add("");
                    answerItemList6.add("");
                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                }

            } catch (JSONException e) {
                e.printStackTrace();

            }

        } else if (total_question_int == 2) {
            answerItemList2.clear();
            try {
                //如果是单选，看看哪个被选中
                if (currentInfo.questionList.get(1).getType().equals("4")) {
                    if (one_daxuan == 1) {
                        question2.put("content", "A");
                        answerItemList2.add("A");
                    } else if (two_daxuan == 1) {
                        question2.put("content", "B");
                        answerItemList2.add("B");
                    } else if (three_daxuan == 1) {
                        question2.put("content", "C");
                        answerItemList2.add("C");
                    } else if (four_daxuan == 1) {
                        question2.put("content", "D");
                        answerItemList2.add("D");
                    } else if (five_daxuan == 1) {
                        question2.put("content", "E");
                        answerItemList2.add("E");
                    } else {
                        question2.put("content", "");
                        answerItemList2.add("");
                    }
                    question2.put("type", "4");

                    question3.put("content", "");
                    question3.put("type", "4");
                    question4.put("content", "");
                    question4.put("type", "4");
                    question5.put("content", "");
                    question5.put("type", "4");
                    question6.put("content", "");
                    question6.put("type", "4");
                    question7.put("content", "");
                    question7.put("type", "4");
                    question8.put("content", "");
                    question8.put("type", "4");
                    question9.put("content", "");
                    question9.put("type", "4");
                    question10.put("content", "");
                    question10.put("type", "4");


                    answerItemList3.add("");
                    answerItemList4.add("");
                    answerItemList5.add("");
                    answerItemList6.add("");
                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                } else if (currentInfo.questionList.get(1).getType().equals("5")) {

//                    Log.e("====size", collectIds.size() + "---jy");
                    String str = collectIds.toString();
                    int len = str.length() - 1;
                    String ids = str.substring(1, len).replace(" ", "");//"keyids":”1,2,3”
                    question2.put("content", ids);
                    question2.put("type", "5");

                    question3.put("content", "");
                    question3.put("type", "5");
                    question4.put("content", "");
                    question4.put("type", "5");
                    question5.put("content", "");
                    question5.put("type", "5");
                    question6.put("content", "");
                    question6.put("type", "5");
                    question7.put("content", "");
                    question7.put("type", "5");
                    question8.put("content", "");
                    question8.put("type", "5");
                    question9.put("content", "");
                    question9.put("type", "5");
                    question10.put("content", "");
                    question10.put("type", "5");

                    if(collectIds.size() != 0){
                        answerItemList2.addAll(collectIds);
                    }else {
                        answerItemList2.add("");
                    }


                } else if (currentInfo.questionList.get(1).getType().equals("2")) {
                    if (one_panduan == 1) {
                        question2.put("content", "A");
                        answerItemList2.add("A");
                    } else if (two_panduan == 1) {
                        question2.put("content", "B");
                        answerItemList2.add("B");
                    } else if (three_panduan == 1) {
                        question2.put("content", "C");
                        answerItemList2.add("C");
                    } else if (four_panduan == 1) {
                        question2.put("content", "D");
                        answerItemList2.add("D");
                    } else if (five_panduan == 1) {
                        question2.put("content", "E");
                        answerItemList2.add("E");
                    } else {
                        question2.put("content", "");
                        answerItemList2.add("");
                    }
                    question2.put("type", "2");

                    question3.put("content", "");
                    question3.put("type", "2");
                    question4.put("content", "");
                    question4.put("type", "2");
                    question5.put("content", "");
                    question5.put("type", "2");
                    question6.put("content", "");
                    question6.put("type", "2");
                    question7.put("content", "");
                    question7.put("type", "2");
                    question8.put("content", "");
                    question8.put("type", "2");
                    question9.put("content", "");
                    question9.put("type", "2");
                    question10.put("content", "");
                    question10.put("type", "2");

                    answerItemList3.add("");
                    answerItemList4.add("");
                    answerItemList5.add("");
                    answerItemList6.add("");
                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                }

            } catch (JSONException e) {
                e.printStackTrace();

            }
        } else if (total_question_int == 3) {
            answerItemList3.clear();
            try {
                //如果是单选，看看哪个被选中
                if (currentInfo.questionList.get(2).getType().equals("4")) {
                    if (one_daxuan == 1) {
                        question3.put("content", "A");
                        answerItemList3.add("A");
                    } else if (two_daxuan == 1) {
                        question3.put("content", "B");
                        answerItemList3.add("B");
                    } else if (three_daxuan == 1) {
                        question3.put("content", "C");
                        answerItemList3.add("C");
                    } else if (four_daxuan == 1) {
                        question3.put("content", "D");
                        answerItemList3.add("D");
                    } else if (five_daxuan == 1) {
                        question3.put("content", "E");
                        answerItemList3.add("E");
                    } else {
                        question3.put("content", "");
                        answerItemList3.add("");
                    }
                    question3.put("type", "4");

                    question4.put("content", "");
                    question4.put("type", "4");
                    question5.put("content", "");
                    question5.put("type", "4");
                    question6.put("content", "");
                    question6.put("type", "4");
                    question7.put("content", "");
                    question7.put("type", "4");
                    question8.put("content", "");
                    question8.put("type", "4");
                    question9.put("content", "");
                    question9.put("type", "4");
                    question10.put("content", "");
                    question10.put("type", "4");


                    answerItemList4.add("");
                    answerItemList5.add("");
                    answerItemList6.add("");
                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                } else if (currentInfo.questionList.get(2).getType().equals("5")) {

//                    Log.e("====size", collectIds.size() + "---jy");
                    String str = collectIds.toString();
                    int len = str.length() - 1;
                    String ids = str.substring(1, len).replace(" ", "");//"keyids":”1,2,3”
                    question3.put("content", ids);
                    question3.put("type", "5");

                    question4.put("content", "");
                    question4.put("type", "5");
                    question5.put("content", "");
                    question5.put("type", "5");
                    question6.put("content", "");
                    question6.put("type", "5");
                    question7.put("content", "");
                    question7.put("type", "5");
                    question8.put("content", "");
                    question8.put("type", "5");
                    question9.put("content", "");
                    question9.put("type", "5");
                    question10.put("content", "");
                    question10.put("type", "5");

                    if(collectIds.size() != 0){
                        answerItemList3.addAll(collectIds);
                    }else {
                        answerItemList3.add("");
                    }
                } else if (currentInfo.questionList.get(2).getType().equals("2")) {
                    if (one_panduan == 1) {
                        question3.put("content", "A");
                        answerItemList3.add("A");
                    } else if (two_panduan == 1) {
                        question3.put("content", "B");
                        answerItemList3.add("B");
                    } else if (three_panduan == 1) {
                        question3.put("content", "C");
                        answerItemList3.add("C");
                    } else if (four_panduan == 1) {
                        question3.put("content", "D");
                        answerItemList3.add("D");
                    } else if (five_panduan == 1) {
                        question3.put("content", "E");
                        answerItemList3.add("E");
                    } else {
                        question3.put("content", "");
                        answerItemList3.add("");
                    }
                    question3.put("type", "2");

                    question4.put("content", "");
                    question4.put("type", "2");
                    question5.put("content", "");
                    question5.put("type", "2");
                    question6.put("content", "");
                    question6.put("type", "2");
                    question7.put("content", "");
                    question7.put("type", "2");
                    question8.put("content", "");
                    question8.put("type", "2");
                    question9.put("content", "");
                    question9.put("type", "2");
                    question10.put("content", "");
                    question10.put("type", "2");

                    answerItemList4.add("");
                    answerItemList5.add("");
                    answerItemList6.add("");
                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                }

            } catch (JSONException e) {
                e.printStackTrace();

            }
        } else if (total_question_int == 4) {
            answerItemList4.clear();
            try {
                //如果是单选，看看哪个被选中
                if (currentInfo.questionList.get(3).getType().equals("4")) {
                    if (one_daxuan == 1) {
                        question4.put("content", "A");
                        answerItemList4.add("A");
                    } else if (two_daxuan == 1) {
                        question4.put("content", "B");
                        answerItemList4.add("B");
                    } else if (three_daxuan == 1) {
                        question4.put("content", "C");
                        answerItemList4.add("C");
                    } else if (four_daxuan == 1) {
                        question4.put("content", "D");
                        answerItemList4.add("D");
                    } else if (five_daxuan == 1) {
                        question4.put("content", "E");
                        answerItemList4.add("E");
                    } else {
                        question4.put("content", "");
                        answerItemList4.add("");
                    }
                    question4.put("type", "4");

                    question5.put("content", "");
                    question5.put("type", "4");
                    question6.put("content", "");
                    question6.put("type", "4");
                    question7.put("content", "");
                    question7.put("type", "4");
                    question8.put("content", "");
                    question8.put("type", "4");
                    question9.put("content", "");
                    question9.put("type", "4");
                    question10.put("content", "");
                    question10.put("type", "4");


                    answerItemList5.add("");
                    answerItemList6.add("");
                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                } else if (currentInfo.questionList.get(3).getType().equals("5")) {

//                    Log.e("====size", collectIds.size() + "---jy");
                    String str = collectIds.toString();
                    int len = str.length() - 1;
                    String ids = str.substring(1, len).replace(" ", "");//"keyids":”1,2,3”
                    question4.put("content", ids);
                    question4.put("type", "5");


                    question5.put("content", "");
                    question5.put("type", "5");
                    question6.put("content", "");
                    question6.put("type", "5");
                    question7.put("content", "");
                    question7.put("type", "5");
                    question8.put("content", "");
                    question8.put("type", "5");
                    question9.put("content", "");
                    question9.put("type", "5");
                    question10.put("content", "");
                    question10.put("type", "5");

                    if(collectIds.size() != 0){
                        answerItemList4.addAll(collectIds);
                    }else {
                        answerItemList4.add("");
                    }
                } else if (currentInfo.questionList.get(3).getType().equals("2")) {
                    if (one_panduan == 1) {
                        question4.put("content", "A");
                        answerItemList4.add("A");
                    } else if (two_panduan == 1) {
                        question4.put("content", "B");
                        answerItemList4.add("B");
                    } else if (three_panduan == 1) {
                        question4.put("content", "C");
                        answerItemList4.add("C");
                    } else if (four_panduan == 1) {
                        question4.put("content", "D");
                        answerItemList4.add("D");
                    } else if (five_panduan == 1) {
                        question4.put("content", "E");
                        answerItemList4.add("E");
                    } else {
                        question4.put("content", "");
                        answerItemList4.add("");
                    }
                    question4.put("type", "2");

                    question5.put("content", "");
                    question5.put("type", "2");
                    question6.put("content", "");
                    question6.put("type", "2");
                    question7.put("content", "");
                    question7.put("type", "2");
                    question8.put("content", "");
                    question8.put("type", "2");
                    question9.put("content", "");
                    question9.put("type", "2");
                    question10.put("content", "");
                    question10.put("type", "2");

                    answerItemList5.add("");
                    answerItemList6.add("");
                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                }

            } catch (JSONException e) {
                e.printStackTrace();

            }
        } else if (total_question_int == 5) {
            answerItemList5.clear();
            try {
                //如果是单选，看看哪个被选中
                if (currentInfo.questionList.get(4).getType().equals("4")) {
                    if (one_daxuan == 1) {
                        question5.put("content", "A");
                        answerItemList5.add("A");
                    } else if (two_daxuan == 1) {
                        question5.put("content", "B");
                        answerItemList5.add("B");
                    } else if (three_daxuan == 1) {
                        question5.put("content", "C");
                        answerItemList5.add("C");
                    } else if (four_daxuan == 1) {
                        question5.put("content", "D");
                        answerItemList5.add("D");
                    } else if (five_daxuan == 1) {
                        question5.put("content", "E");
                        answerItemList5.add("E");
                    } else {
                        question5.put("content", "");
                        answerItemList5.add("");
                    }
                    question5.put("type", "4");

                    question6.put("content", "");
                    question6.put("type", "4");
                    question7.put("content", "");
                    question7.put("type", "4");
                    question8.put("content", "");
                    question8.put("type", "4");
                    question9.put("content", "");
                    question9.put("type", "4");
                    question10.put("content", "");
                    question10.put("type", "4");


                    answerItemList6.add("");
                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                } else if (currentInfo.questionList.get(4).getType().equals("5")) {

//                    Log.e("====size", collectIds.size() + "---jy");
                    String str = collectIds.toString();
                    int len = str.length() - 1;
                    String ids = str.substring(1, len).replace(" ", "");//"keyids":”1,2,3”
                    question5.put("content", ids);
                    question5.put("type", "5");

                    question6.put("content", "");
                    question6.put("type", "5");
                    question7.put("content", "");
                    question7.put("type", "5");
                    question8.put("content", "");
                    question8.put("type", "5");
                    question9.put("content", "");
                    question9.put("type", "5");
                    question10.put("content", "");
                    question10.put("type", "5");

                    if(collectIds.size() != 0){
                        answerItemList5.addAll(collectIds);
                    }else {
                        answerItemList5.add("");
                    }
                } else if (currentInfo.questionList.get(4).getType().equals("2")) {
                    if (one_panduan == 1) {
                        question5.put("content", "A");
                        answerItemList5.add("A");
                    } else if (two_panduan == 1) {
                        question5.put("content", "B");
                        answerItemList5.add("B");
                    } else if (three_panduan == 1) {
                        question5.put("content", "C");
                        answerItemList5.add("C");
                    } else if (four_panduan == 1) {
                        question5.put("content", "D");
                        answerItemList5.add("D");
                    } else if (five_panduan == 1) {
                        question5.put("content", "E");
                        answerItemList5.add("E");
                    } else {
                        question5.put("content", "");
                        answerItemList5.add("");
                    }
                    question5.put("type", "2");

                    question6.put("content", "");
                    question6.put("type", "2");
                    question7.put("content", "");
                    question7.put("type", "2");
                    question8.put("content", "");
                    question8.put("type", "2");
                    question9.put("content", "");
                    question9.put("type", "2");
                    question10.put("content", "");
                    question10.put("type", "2");


                    answerItemList6.add("");
                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                }

            } catch (JSONException e) {
                e.printStackTrace();

            }
        } else if (total_question_int == 6) {
            answerItemList6.clear();
            try {
                //如果是单选，看看哪个被选中
                if (currentInfo.questionList.get(5).getType().equals("4")) {
                    if (one_daxuan == 1) {
                        question6.put("content", "A");
                        answerItemList6.add("A");
                    } else if (two_daxuan == 1) {
                        question6.put("content", "B");
                        answerItemList6.add("B");
                    } else if (three_daxuan == 1) {
                        question6.put("content", "C");
                        answerItemList6.add("C");
                    } else if (four_daxuan == 1) {
                        question6.put("content", "D");
                        answerItemList6.add("D");
                    } else if (five_daxuan == 1) {
                        question6.put("content", "E");
                        answerItemList6.add("E");
                    } else {
                        question6.put("content", "");
                        answerItemList6.add("");
                    }
                    question6.put("type", "4");

                    question7.put("content", "");
                    question7.put("type", "4");
                    question8.put("content", "");
                    question8.put("type", "4");
                    question9.put("content", "");
                    question9.put("type", "4");
                    question10.put("content", "");
                    question10.put("type", "4");


                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                } else if (currentInfo.questionList.get(5).getType().equals("5")) {

//                    Log.e("=====", five_duoxuan + ":" + four_duoxuan + ":" + three_duoxuan + ":" + two_duoxuan + ":" + one_duoxuan + ":");
//                    Log.e("====size", collectIds.size() + "---jy");
                    String str = collectIds.toString();
                    int len = str.length() - 1;
                    String ids = str.substring(1, len).replace(" ", "");//"keyids":”1,2,3”
                    question6.put("content", ids);
                    question6.put("type", "5");

                    question7.put("content", "");
                    question7.put("type", "5");
                    question8.put("content", "");
                    question8.put("type", "5");
                    question9.put("content", "");
                    question9.put("type", "5");
                    question10.put("content", "");
                    question10.put("type", "5");

                    if(collectIds.size() != 0){
                        answerItemList6.addAll(collectIds);
                    }else {
                        answerItemList6.add("");
                    }
                } else if (currentInfo.questionList.get(5).getType().equals("2")) {
                    if (one_panduan == 1) {
                        question6.put("content", "A");
                        answerItemList6.add("A");
                    } else if (two_panduan == 1) {
                        question6.put("content", "B");
                        answerItemList6.add("B");
                    } else if (three_panduan == 1) {
                        question6.put("content", "C");
                        answerItemList6.add("C");
                    } else if (four_panduan == 1) {
                        question6.put("content", "D");
                        answerItemList6.add("D");
                    } else if (five_panduan == 1) {
                        question6.put("content", "E");
                        answerItemList6.add("E");
                    } else {
                        question6.put("content", "");
                        answerItemList6.add("");
                    }
                    question6.put("type", "2");

                    question7.put("content", "");
                    question7.put("type", "2");
                    question8.put("content", "");
                    question8.put("type", "2");
                    question9.put("content", "");
                    question9.put("type", "2");
                    question10.put("content", "");
                    question10.put("type", "2");

                    answerItemList7.add("");
                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                }

            } catch (JSONException e) {
                e.printStackTrace();

            }
        } else if (total_question_int == 7) {
            answerItemList7.clear();
            try {
                //如果是单选，看看哪个被选中
                if (currentInfo.questionList.get(6).getType().equals("4")) {
                    if (one_daxuan == 1) {
                        question7.put("content", "A");
                        answerItemList7.add("A");
                    } else if (two_daxuan == 1) {
                        question7.put("content", "B");
                        answerItemList7.add("B");
                    } else if (three_daxuan == 1) {
                        question7.put("content", "C");
                        answerItemList7.add("C");
                    } else if (four_daxuan == 1) {
                        question7.put("content", "D");
                        answerItemList7.add("D");
                    } else if (five_daxuan == 1) {
                        question7.put("content", "E");
                        answerItemList7.add("E");
                    } else {
                        question7.put("content", "");
                        answerItemList7.add("");
                    }
                    question7.put("type", "4");

                    question8.put("content", "");
                    question8.put("type", "4");
                    question9.put("content", "");
                    question9.put("type", "4");
                    question10.put("content", "");
                    question10.put("type", "4");


                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                } else if (currentInfo.questionList.get(6).getType().equals("5")) {

                    Log.e("====size", collectIds.size() + "---jy");
                    String str = collectIds.toString();
                    int len = str.length() - 1;
                    String ids = str.substring(1, len).replace(" ", "");//"keyids":”1,2,3”
                    question7.put("content", ids);
                    question7.put("type", "5");

                    question8.put("content", "");
                    question8.put("type", "5");
                    question9.put("content", "");
                    question9.put("type", "5");
                    question10.put("content", "");
                    question10.put("type", "5");

                    if(collectIds.size() != 0){
                        answerItemList7.addAll(collectIds);
                    }else {
                        answerItemList7.add("");
                    }
                } else if (currentInfo.questionList.get(6).getType().equals("2")) {
                    if (one_panduan == 1) {
                        question7.put("content", "A");
                        answerItemList7.add("A");
                    } else if (two_panduan == 1) {
                        question7.put("content", "B");
                        answerItemList7.add("B");
                    } else if (three_panduan == 1) {
                        question7.put("content", "C");
                        answerItemList7.add("C");
                    } else if (four_panduan == 1) {
                        question7.put("content", "D");
                        answerItemList7.add("D");
                    } else if (five_panduan == 1) {
                        question7.put("content", "E");
                        answerItemList7.add("E");
                    } else {
                        question7.put("content", "");
                        answerItemList7.add("");
                    }
                    question7.put("type", "2");

                    question8.put("content", "");
                    question8.put("type", "2");
                    question9.put("content", "");
                    question9.put("type", "2");
                    question10.put("content", "");
                    question10.put("type", "2");

                    answerItemList8.add("");
                    answerItemList9.add("");
                    answerItemList10.add("");
                }

            } catch (JSONException e) {
                e.printStackTrace();

            }
        } else if (total_question_int == 8) {
            answerItemList8.clear();
            try {
                //如果是单选，看看哪个被选中
                if (currentInfo.questionList.get(7).getType().equals("4")) {
                    if (one_daxuan == 1) {
                        question8.put("content", "A");
                        answerItemList8.add("A");
                    } else if (two_daxuan == 1) {
                        question8.put("content", "B");
                        answerItemList8.add("B");
                    } else if (three_daxuan == 1) {
                        question8.put("content", "C");
                        answerItemList8.add("C");
                    } else if (four_daxuan == 1) {
                        question8.put("content", "D");
                        answerItemList8.add("D");
                    } else if (five_daxuan == 1) {
                        question8.put("content", "E");
                        answerItemList8.add("E");
                    } else {
                        question8.put("content", "");
                        answerItemList8.add("");
                    }
                    question8.put("type", "4");

                    question9.put("content", "");
                    question9.put("type", "4");
                    question10.put("content", "");
                    question10.put("type", "4");


                    answerItemList9.add("");
                    answerItemList10.add("");
                } else if (currentInfo.questionList.get(7).getType().equals("5")) {

                    Log.e("====size", collectIds.size() + "---jy");
                    String str = collectIds.toString();
                    int len = str.length() - 1;
                    String ids = str.substring(1, len).replace(" ", "");//"keyids":”1,2,3”
                    question8.put("content", ids);
                    question8.put("type", "5");

                    question9.put("content", "");
                    question9.put("type", "5");
                    question10.put("content", "");
                    question10.put("type", "5");
                    if(collectIds.size() != 0){
                        answerItemList8.addAll(collectIds);
                    }else {
                        answerItemList8.add("");
                    }
                } else if (currentInfo.questionList.get(7).getType().equals("2")) {
                    if (one_panduan == 1) {
                        question8.put("content", "A");
                        answerItemList8.add("A");
                    } else if (two_panduan == 1) {
                        question8.put("content", "B");
                        answerItemList8.add("B");
                    } else if (three_panduan == 1) {
                        question8.put("content", "C");
                        answerItemList8.add("C");
                    } else if (four_panduan == 1) {
                        question8.put("content", "D");
                        answerItemList8.add("D");
                    } else if (five_panduan == 1) {
                        question8.put("content", "E");
                        answerItemList8.add("E");
                    } else {
                        question8.put("content", "");
                        answerItemList8.add("");
                    }
                    question8.put("type", "2");

                    question9.put("content", "");
                    question9.put("type", "2");
                    question10.put("content", "");
                    question10.put("type", "2");

                    answerItemList9.add("");
                    answerItemList10.add("");
                }

            } catch (JSONException e) {
                e.printStackTrace();

            }
        } else if (total_question_int == 9) {
            answerItemList9.clear();
            try {
                //如果是单选，看看哪个被选中
                if (currentInfo.questionList.get(8).getType().equals("4")) {
                    if (one_daxuan == 1) {
                        question9.put("content", "A");
                        answerItemList9.add("A");
                    } else if (two_daxuan == 1) {
                        question9.put("content", "B");
                        answerItemList9.add("B");
                    } else if (three_daxuan == 1) {
                        question9.put("content", "C");
                        answerItemList9.add("C");
                    } else if (four_daxuan == 1) {
                        question9.put("content", "D");
                        answerItemList9.add("D");
                    } else if (five_daxuan == 1) {
                        question9.put("content", "E");
                        answerItemList9.add("E");
                    } else {
                        question9.put("content", "");
                        answerItemList9.add("");
                    }
                    question9.put("type", "4");

                    question10.put("content", "");
                    question10.put("type", "4");

                    answerItemList10.add("");
                } else if (currentInfo.questionList.get(8).getType().equals("5")) {

                    Log.e("====size", collectIds.size() + "---jy");
                    String str = collectIds.toString();
                    int len = str.length() - 1;
                    String ids = str.substring(1, len).replace(" ", "");//"keyids":”1,2,3”
                    question9.put("content", ids);
                    question9.put("type", "5");

                    question10.put("content", "");
                    question10.put("type", "5");

                    if(collectIds.size() != 0){
                        answerItemList9.addAll(collectIds);
                    }else {
                        answerItemList9.add("");
                    }
                } else if (currentInfo.questionList.get(8).getType().equals("2")) {
                    if (one_panduan == 1) {
                        question9.put("content", "A");
                        answerItemList9.add("A");
                    } else if (two_panduan == 1) {
                        question9.put("content", "B");
                        answerItemList9.add("B");
                    } else if (three_panduan == 1) {
                        question9.put("content", "C");
                        answerItemList9.add("C");
                    } else if (four_panduan == 1) {
                        question9.put("content", "D");
                        answerItemList9.add("D");
                    } else if (five_panduan == 1) {
                        question9.put("content", "E");
                        answerItemList9.add("E");
                    } else {
                        question9.put("content", "");
                        answerItemList9.add("");
                    }
                    question9.put("type", "2");

                    question10.put("content", "");
                    question10.put("type", "2");

                    answerItemList10.add("");
                }

            } catch (JSONException e) {
                e.printStackTrace();

            }
        } else if (total_question_int == 10) {
            try {
                if (currentInfo.questionList.get(9).getType().equals("4")) {
                    if (one_daxuan == 1) {
                        question10.put("content", "A");
                        answerItemList10.add("A");
                    } else if (two_daxuan == 1) {
                        question10.put("content", "B");
                        answerItemList10.add("B");
                    } else if (three_daxuan == 1) {
                        question10.put("content", "C");
                        answerItemList10.add("C");
                    } else if (four_daxuan == 1) {
                        question10.put("content", "D");
                        answerItemList10.add("D");
                    } else if (five_daxuan == 1) {
                        question10.put("content", "E");
                        answerItemList10.add("E");
                    } else {
                        question10.put("content", "");
                        answerItemList10.add("");
                    }
                    question10.put("type", "4");
                } else if (currentInfo.questionList.get(9).getType().equals("5")) {

                    String str = collectIds.toString();
                    int len = str.length() - 1;
                    String ids = str.substring(1, len).replace(" ", "");//"keyids":”1,2,3”
                    question10.put("content", ids);
                    question10.put("type", "5");
                    if(collectIds.size() != 0){
                        answerItemList10.addAll(collectIds);
                    }else {
                        answerItemList10.add("");
                    }

                } else if (currentInfo.questionList.get(9).getType().equals("2")) {
                    if (one_panduan == 1) {
                        question10.put("content", "A");
                        answerItemList10.add("A");
                    } else if (two_panduan == 1) {
                        question10.put("content", "B");
                        answerItemList10.add("B");
                    } else if (three_panduan == 1) {
                        question10.put("content", "C");
                        answerItemList10.add("C");
                    } else if (four_panduan == 1) {
                        question10.put("content", "D");
                        answerItemList10.add("D");
                    } else if (five_panduan == 1) {
                        question10.put("content", "E");
                        answerItemList10.add("E");
                    } else {
                        question10.put("content", "");
                        answerItemList10.add("");
                    }
                    question10.put("type", "2");
                }

            } catch (JSONException e) {
                e.printStackTrace();

            }


        }

    }
}
